<!--
#    Copyright 2014 COOPGIS Consulting
#    This file is part of COOPGIS.
#    COOPGIS is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#    COOPGIS is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#    You should have received a copy of the GNU General Public License
#    along with COOPGIS.  If not, see <http://www.gnu.org/licenses/>.
-->


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <style type="text/css">
        #map {
            width: 800px;
            height: 600px;
            border: 1px solid black;
        }
    </style>
    {{ OpenLayersJavaScriptHeading|safe }}

    
    <title>COOPGIS Map Viewer</title>
  </head>
  <body>
	<b>COOPGIS Map Viewer </b> &nbsp&nbsp&nbsp&nbsp <small><a href="/coopgis/">Main Menu</a></small>
 <table>
<tr>
<td><div id="map"> {{ OpenLayersJavaScript|safe }}</div></td>
<td>
<br>
<a href="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q={{Longitude}}W+{{Latitude}}N&sll={{Longitude}},{{Latitude}}">External Road Map (Internet Access Required)</a>


<br>
<br>
County:  {{County}}
<br><br>


<form method="post" action="">
	<table>
<tr><td>Map Selection</td><td>{{form.Map}}</td><tr>
<tr><td>Station</td><td> {{form.SelectStationid}}</td><tr>
<tr><td>Tag #</td><td> {{form.SelectStationTagNumber}}</td></tr>
<tr><td>Map #</td><td> {{form.OldMapNumber}}</td></tr>
<tr><td>Road Name: </td><td> {{form.RoadName}}</td></tr>
<tr><td>Meter #:  </td><td> {{form.SelectMeterNumber}}</td><tr>
<tr><td>DCSI #:  </td><td> {{form.SelectDCSINumber}}</td><tr>
<tr><td>Show Grid Info:</td><td> {{form.ShowGridInfoIndicator}}</td></tr>

</table>
	<input type="submit" />
</form>

</td></tr>


<tr>
<td valign=top><img src="/cgi-bin/mapserv.cgi?mode=legend&map={{MapFileName}}"></td>
<td valign=top><h4>Nearby Assembly Information</h4><small>
	{% for line in StationAssemblyList %}
	 {{line}}<br>
	{% endfor %}
</small></td><br>

<td valign=top><h4>Nearby Span Information</h4><small>
	{% for line in SpanAssemblyList %}
	{{line}}<br>
	{% endfor %}
</small>
</td>
</tr>
</table>

<br>

Current Map:  {{CurrentGridSquareName}}<br>
<table>
<tr><th>Meters in the Current Map Square</th></tr>
<tr><th> Map Number </td><th> Station </th></tr>
{% for row in MapNumbersWithStation %}
    <tr>{% for item in row %}
            <td>{{item}}</td>
        {% endfor %}
    </tr>
{% endfor %}
<tr><th>Meters with Map Numbers that Match the current Map</th></tr>
<tr><th> Map Number </td><th> Station </th><th> Map </th></tr>
{% for row in MapNumbersWithStationAndMap %}
    <tr>{% for item in row %}
            <td>{{item}}</td>
        {% endfor %}
    </tr>
{% endfor %}

</table>




<ul>
<li>To zoom to a box, hold down the shift key and drag to create a rectangle</li>
<li><a href="/coopgis/printer/">Large Map Printer</a>
</ul>
  </body>
</html>
